package com.ldj.tim.common.dto;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ldj.tim.common.pojo.P2PInfo;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author majinhui
 * @description
 * @create 2024/11/20 14:40
 **/
@Data
@TableName("im_msg_content")
@NoArgsConstructor
public class MsgContentDTO {
    @TableId
    private String mid;
    private Long ownerUid;
    private Long otherUid;
    private String msgContent;

    public MsgContentDTO(P2PInfo info){
        this.mid = info.getMsgId();
        this.ownerUid = info.getOwnerUid();
        this.otherUid = info.getOtherUid();
        this.msgContent = info.getMessage();
    }
}
